set_property(GLOBAL PROPERTY "GATHER_EXPORT_PROJECTS" TRUE)
ez_add_all_subdirs()
set_property(GLOBAL PROPERTY "GATHER_EXPORT_PROJECTS" FALSE)

if(NOT EZ_CMAKE_NO_BUILD_INFO)
	execute_process(
		COMMAND git rev-parse --short=12 HEAD
		WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
		OUTPUT_VARIABLE EZ_GIT_COMMIT_HASH_SHORT
		OUTPUT_STRIP_TRAILING_WHITESPACE
		)
		
	execute_process(
		COMMAND git rev-parse HEAD
		WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
		OUTPUT_VARIABLE EZ_GIT_COMMIT_HASH_LONG
		OUTPUT_STRIP_TRAILING_WHITESPACE
		)
		
	execute_process(
		COMMAND git rev-parse --abbrev-ref=strict HEAD
		WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
		OUTPUT_VARIABLE EZ_GIT_BRANCH_NAME
		OUTPUT_STRIP_TRAILING_WHITESPACE
		)

	configure_file("${CMAKE_CURRENT_LIST_DIR}/ezBuildInfo.h.in" "${CMAKE_CURRENT_LIST_DIR}/ezBuildInfo.h" NEWLINE_STYLE LF)
endif()